package cn.netuo.bumbersoll.helper.bluetooth;

import android.bluetooth.BluetoothDevice;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;

/**
 * Created by JS_grasp on 2019/3/16.
 */
public class BluetoothStatusReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        action = TextUtils.isEmpty(action) ? "" : action;
        switch (action){
            case BluetoothDevice.ACTION_FOUND:{             // 搜索到设备
                break;
            }
            case BluetoothDevice.ACTION_ACL_CONNECTED:{     // 连接
                break;
            }
            case BluetoothDevice.ACTION_ACL_DISCONNECTED:{  // 断开连接
                break;
            }
            case BluetoothDevice.ACTION_BOND_STATE_CHANGED:{    //
                break;
            }
        }
    }
}